import http from '@/utils/request'

export default{
  async getDepartmentList(params){
    return await http.get('/api/department/list',params);
  },
  //部门树数据
  async getDepartmentTree(){
    return await http.get('/api/department/parent/list');
  },
  //新增部门
  async addDept(params){
    return await http.post('/api/department/add',params);
  },
  //编辑部门
  async updateDept(params){
    return await http.put('/api/department/update',params);
  },
  //检查部门是否存在
  async checkDept(params){
    return await http.getRestApi('/api/department/check',params);
  },
  //删除部门
  async delDept(params){
    return await http.delete('/api/department/delete',params);
  }
}
